package com.lesama.permission;

public class TestDemo {
    /*
    * public: 所有均可访问
    * protected: 同一类、不同包、同一子类
    * (default): 同一类、同一包下
    * privated: 私有，不允许类外访问
    * */
    public static void main(String[] args) {
        Student stu = new Student();
        System.out.println(stu.age);
        System.out.println(stu.score);
        System.out.println(stu.gender);
//        System.out.println(stu.name);    private属性不允许被外界访问
        stu.print();
    }
}
